package com.jmodata.zxu.service.manager;

import com.jmodata.zxu.pojo.manager.Manager;
import com.jmodata.zxu.pojo.manager.Menu;
import com.jmodata.zxu.pojo.manager.Operation;
import com.jmodata.zxu.model.Tree;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 菜单业务层接�?
 * 
 * @author Chen
 * 
 */
public interface MenuService {

	/**
	 * 添加菜单
	 * 
	 * @param menu
	 * @return
	 */
	public int insertMenu(Menu menu) throws Exception;

	/**
	 * 修改菜单
	 * 
	 * @param menu
	 * @return
	 */
	public int updateMenu(Menu menu) throws Exception;

	/**
	 * 删除菜单
	 * 
	 * @param menu_id
	 * @return
	 * @throws Exception
	 */
	public int deleteMenu(BigDecimal menu_id) throws Exception;

	/**
	 * 通过管理员编号查询权限菜�?
	 * 
	 * @param
	 * @return
	 * @throws Exception
	 */
	public List<Tree> queryMenuTreeByManagerId(Manager manager, String id) throws Exception;

	/**
	 * 查询菜单列表
	 * 
	 * @param
	 *
	 * @param menu
	 *            条件
	 * @return
	 * @throws Exception
	 */
	public List<Tree> queryMenuList(Menu menu, String id) throws Exception;

	/**
	 * 查询菜单列表总数
	 * 
	 * @param
	 * @param menu
	 * @return
	 * @throws Exception
	 */
	public int queryMenuListCount(Menu menu) throws Exception;

	/**
	 * 通过菜单编号查询菜单
	 * 
	 * @param menuid
	 * @return
	 * @throws Exception
	 */
	public Menu getMenuById(String menuid) throws Exception;

	/**
	 * 查询管理员是否有增�?删�?改的操作权限
	 * 
	 * @param managerid
	 * @return
	 * @throws Exception
	 */
	public List<String> getManagerGrant(String managerid) throws Exception;

	/**
	 * 获取模块的操作权限
	 * 
	 * @param map
	 * @return
	 */
	public List<Operation> getGrant(Map<String, Object> map);
}
